package com.atcd.springcloud.service;


import com.atcd.springcloud.entities.Payment;
import com.atcd.springcloud.entities.ResponseResult;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
//哪个微服务
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
    //微服务下的方法
    @GetMapping("/payment/get/{id}")
  public    ResponseResult<Payment> get(@PathVariable("id") Long  id);

    @GetMapping("/payment/feign/timeout")
    public String paymentFeignTimeout();
}
